Skip to content

fix: hide remove container btn when only one container exists#8272

Open
dcpagotto wants to merge 1 commit intonasa:masterfrom
dcpagotto:mct7274
Open

fix: hide remove container btn when only one container exists#8272
dcpagotto wants to merge 1 commit intonasa:masterfrom
dcpagotto:mct7274

Conversation

@dcpagotto
Copy link
Copy Markdown

@dcpagotto dcpagotto commented Mar 4, 2026

Closes #7274

Describe your changes:

The remove container button was showing up in the toolbar even when there was only one container left in the flexible layout. clicking it would either fail or delete the content inside wich is pretty confusing for users.

Added a check in toolbarProvider.js to only show the button when containers.length > 1. Also added an e2e test that verifies the button hides and shows correctly based on container count.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

@dcpagotto
Copy link
Copy Markdown
Author

Hey, just checking in on this one. Is there anything else I should change or add to get this reviewed? I tried to keep the changes minimal and added the e2e test to cover the scenario. Let me know if theres something missing or if you need me to rebase on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flexible Layouts] The Remove Container (frame) button does work, but now it's available when there's only one frame

1 participant